package lab02.test12;

public class Rectangular extends Shape {
    //属性：长和宽
    double width;
    double height;


    //ctrl + o重写快捷键
    //ctrl + h查看继承关系

    //方法重写
    @Override
    double area() {
        return width * height;
    }

    @Override
    double perimeter() {
        return 2 * (width + height);
    }
}
